import { ref, computed, onMounted } from 'vue';

export default function () {
  // 数据
   let sum = ref(0)
   let bigSum = computed(() => {
    return sum.value * 10
   })

  function add() {
    sum.value += 1
  }

  onMounted(() => add())

  // 向外部提供
  return {sum, bigSum, add}
}
